package com.smallcc.util;

/**
 * @author 晓风过境
 * @TODO
 * @date 2018/3/31 22:13
 * @day 31
 * @return $text$
 * @title ${CLASS_NAME}
 * @project_name sell
 */
public class MathUtil {
    private static final Double MONEY_RANGE=0.1;
    /**
     * 比较两个精度是否相等
     * @param d1
     * @param d2
     * @return
     */
    public static Boolean equals(Double d1,Double d2){
        double result = Math.abs(d1 - d2);
        if(result<MONEY_RANGE){
            return true;
        }
        return false;
    }
}

